From d39c9aec548805aded562f6a93f86451aab2f4ad Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Thu, 6 Dec 2007 15:17:48 +0000 Subject: [PATCH] hvm: buffered_ioreq does not need a 'df' field. Add explicit bitfield padding to ioreq and buf_ioreq structs. Signed-off-by: Keir Fraser --- tools/ioemu/target-i386-dm/helper2.c | 2 +- xen/arch/x86/hvm/intercept.c | 1 - xen/include/public/hvm/ioreq.h | 3 ++- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/ioemu/target-i386-dm/helper2.c b/tools/ioemu/target-i386-dm/helper2.c index c139f12632..e0f16845f6 100644 --- a/tools/ioemu/target-i386-dm/helper2.c +++ b/tools/ioemu/target-i386-dm/helper2.c @@ -556,7 +556,7 @@ void __handle_buffered_iopage(CPUState *env) req.data = buf_req->data; req.state = STATE_IOREQ_READY; req.dir = buf_req->dir; - req.df = buf_req->df; + req.df = 1; req.type = buf_req->type; req.data_is_ptr = 0; qw = (req.size == 8); diff --git a/xen/arch/x86/hvm/intercept.c b/xen/arch/x86/hvm/intercept.c index be58c05d0c..27d0cbc6ab 100644 --- a/xen/arch/x86/hvm/intercept.c +++ b/xen/arch/x86/hvm/intercept.c @@ -176,7 +176,6 @@ int hvm_buffered_io_send(ioreq_t *p) bp.type = p->type; bp.dir = p->dir; - bp.df = p->df; switch ( p->size ) { case 1: diff --git a/xen/include/public/hvm/ioreq.h b/xen/include/public/hvm/ioreq.h index 456d059d92..e14d5a9291 100644 --- a/xen/include/public/hvm/ioreq.h +++ b/xen/include/public/hvm/ioreq.h @@ -58,6 +58,7 @@ struct ioreq { * of the real data to use. */ uint8_t dir:1; /* 1=read, 0=write */ uint8_t df:1; + uint8_t pad:1; uint8_t type; /* I/O type */ uint8_t _pad0[6]; uint64_t io_count; /* How many IO done on a vcpu */ @@ -79,7 +80,7 @@ typedef struct shared_iopage shared_iopage_t; struct buf_ioreq { uint8_t type; /* I/O type */ - uint8_t df:1; /* EFLAGS.DF */ + uint8_t pad:1; uint8_t dir:1; /* 1=read, 0=write */ uint8_t size:2; /* 0=>1, 1=>2, 2=>4, 3=>8. If 8, use two buf_ioreqs */ uint32_t addr:20;/* physical address */ -- 2.30.2